package com.wobito.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wobito.pojo.bean.BorrowLog;
import com.wobito.pojo.bean.ReturnLog;
import com.wobito.pojo.dto.api.GetBorrowReturnLogDTO;
import com.wobito.pojo.dto.log.BorrowLogByBookDTO;
import com.wobito.pojo.dto.log.BorrowLogByPersonDTO;
import com.wobito.pojo.dto.log.BorrowLogDTO;
import com.wobito.pojo.vo.log.BorrowReturnLogVO;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author lambyang
 * @since 2024-08-26
 */
public interface BorrowReturnLogMapper extends BaseMapper<ReturnLog> {

    List<BorrowLogByBookDTO> selectBookBorrowByBookId(Long bookId);

    List<BorrowLogByPersonDTO> selectBookBorrowReturnByPersonId(Long personId);

    List<GetBorrowReturnLogDTO> selectBookLogList(Long bookId);

    List<BorrowLogDTO> selectBorrowLogList(BorrowReturnLogVO borrowReturnLogVO);

    List<BorrowLogDTO> selectReturnLogList(BorrowReturnLogVO borrowReturnLogVO);

    List<BorrowLogDTO> selectBorrowReturnLogList(BorrowReturnLogVO borrowReturnLogVO);

    int insertBorrowLog(BorrowLog borrowLog);

    int insertReturnLog(ReturnLog returnLog);
}
